<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../../tools/css/SaturnDocument.css">
	<style>
		h3 {
			border-bottom:1px dotted #ff6600;
		}	
	</style>
</head>
<body>
	<h3>菜单树：</h3>
	<div id="menutree" class="menutree">
    <ul class="root">
        ${content}
    </ul>
    </div>
</body>
</html>
<script>
	var tree = document.getElementById('menutree');
	tree.style.display = 'block';
	var ulArr = tree.getElementsByTagName('ul');
	for(var i = 1, n = ulArr.length; i < n; i++){
		ulArr[i].style.display = 'none';
	}
	var leaf = tree.getElementsByTagName('li');
	for(var i = 0, n = leaf.length; i < n; i++){
		var text = leaf[i].getElementsByTagName('span')[0];
		var child = text.parentNode.getElementsByTagName('ul')[0];
		text.onclick = function(){
			var ul = this.parentNode.getElementsByTagName('ul');
			if(!ul[0]){return;}
				if(ul[0].style.display == 'none'){
				ul[0].style.display = '';
				this.parentNode.style.background = "url('../../tools/images/minus.gif') no-repeat";
			} else {
				ul[0].style.display = 'none';
				this.parentNode.style.background = "url('../../tools/images/plus.gif') no-repeat";
			}
		}
	}
</script>